from api.api_mp import logger


class Asserts:
    def assert_login(self, msg):
        try:
            assert "登录成功" == msg

        except Exception as e:
            logger.error("登录错误为{}".format(e))

    def assert_login_in(self, information):
        try:
            assert 'success' == information.json().get('msg')
        except:
            logger.error("搜索失败")
